<?php

/**
 * Notification Config Class to handle all SGN Notification type
 *
 * @version $Id: Application.php 1424 2012-03-03 08:15:52Z locth $
 *
 */
class SGN_NotificationConfig
{
    static $NEW_USER_SUGGEST = array(
                                    'id' => 1, 
                                    'renderListAction' => array(
                                                                'popupnewusersuggest', 
                                                                'profile', 
                                                                'sgn'
                                    ), 
                                    'renderAllAction' => array(
                                                            'allnewusersuggest', 
                                                            'profile', 
                                                            'sgn'
                                    ), 
                                    'isFromUserUnique' => true, 
                                    'javaScriptFile' => array(),
    );
    static $FRIEND_REQUEST = array(
                                'id' => 2, 
                                'renderListAction' => array(), 
                                'renderAllAction' => array(), 
                                'contentPage' => '/sgn/notification/showfriendrequest', 
                                'isFromUserUnique' => true, 
                                'isSendMail' => true, 
                                'javaScriptFile' => array(),
    );
    static $CONFIRM_FRIEND = array(
                                'id' => 3, 
                                'renderListAction' => array(), 
                                'renderAllAction' => array(), 
                                'isFromUserUnique' => true, 
                                'javaScriptFile' => array(),
    );
    static $USER_LIKE_FEED = array(
                                'id' => 4, 
                                'renderListAction' => array(
                                                            'popuplikefeed', 
                                                            'wallfeed', 
                                                            'sgn'
                                ), 
                                'renderAllAction' => array(
                                                        'alllikefeed', 
                                                        'wallfeed', 
                                                        'sgn'
                                ), 
                                'isFromUserUnique' => true, 
                                'isSendMail' => true, 
                                'javaScriptFile' => array(),
    );
    static $USER_COMMENT_FEED = array(
                                    'id' => 5, 
                                    'renderListAction' => array(
                                                                'popupcommentfeed', 
                                                                'wallfeed', 
                                                                'sgn'
                                    ), 
                                    'renderAllAction' => array(
                                                            'allcommentfeed', 
                                                            'wallfeed', 
                                                            'sgn'
                                    ), 
                                    'isFromUserUnique' => true, 
                                    'javaScriptFile' => array(),
    );
    static $USER_LIKE_COMMENT = array(
                                    'id' => 6, 
                                    'renderListAction' => array(
                                                                'notif', 
                                                                'comment', 
                                                                'sgn'
                                    ), 
                                    'renderAllAction' => array(
                                                            'notifdetail', 
                                                            'comment', 
                                                            'sgn'
                                    ), 
                                    'isFromUserUnique' => false, 
                                    'javaScriptFile' => array(),
    );
    static $FROM_APP = array(
                            'id' => 7, 
                            'renderListAction' => array(
                                                        'notificationfromapp', 
                                                        'notification', 
                                                        'sgn'
                            ), 
                            'renderAllAction' => array(
                                                    'notificationfromapp', 
                                                    'notification', 
                                                    'sgn'
                            ), 
                            'isFromUserUnique' => true, 
                            'javaScriptFile' => array(),
    );
    static $NEW_FEEDBACK = array(
                                'id' => 8, 
                                'renderListAction' => array(
                                                            'notif', 
                                                            'feedback', 
                                                            'sgn'
                                ), 
                                'renderAllAction' => array(
                                                        'notifdetail', 
                                                        'feedback', 
                                                        'sgn'
                                ), 
                                'isFromUserUnique' => true, 
                                'javaScriptFile' => array(),
    );
    static $TAGFRIEND_POSTFEED = array(
                                'id' => 9, 
                                'renderListAction' => array(
                                                            'popuptagfriendpostfeed', 
                                                            'wallfeed', 
                                                            'sgn'
                                ), 
                                'renderAllAction' => array(
                                                        'alltagfriendpostfeed', 
                                                        'wallfeed', 
                                                        'sgn'
                                ), 
                                'isFromUserUnique' => true, 
                                'javaScriptFile' => array(),
    );
    static $TAGFRIEND_COMMENT = array(
                                'id' => 10, 
                                'renderListAction' => array(
                                                            'popuptagfriendcomment', 
                                                            'wallfeed', 
                                                            'sgn'
                                ), 
                                'renderAllAction' => array(
                                                        'alltagfriendcomment', 
                                                        'wallfeed', 
                                                        'sgn'
                                ), 
                                'isFromUserUnique' => true, 
                                'javaScriptFile' => array(),
    );
    static $EVENT_NOTIF = array(
                                    'id' => 11, 
                                    'renderListAction' => array(
                                                                'event-notification', 
                                                                'events', 
                                                                'guild'
                                    ), 
                                    'renderAllAction' => array(
                                                            'event-show-all-notification', 
                                                            'events', 
                                                            'guild'
                                    ), 
                                    'isFromUserUnique' => true, 
                                    'javaScriptFile' => array()
    );
    static $GROUP_ADD_MEMBER_NOTIF = array(
                                    'id' => 12,
                                    'renderListAction' => array(
                                                                'add-member-notification',
                                                                'members',
                                                                'guild'
                                                                ),
                                    'renderAllAction' => array(
                                                                'add-member-show-all-notification',
                                                                'members',
                                                                'guild'
                                                                ),
                                    'isFromUserUnique' => true,
                                    'javaScriptFile' => array()
                                    );
    static $MAP_ID = array(
                        1 => 'NEW_USER_SUGGEST', 
                        2 => 'FRIEND_REQUEST', 
                        3 => 'CONFIRM_FRIEND', 
                        4 => 'USER_LIKE_FEED', 
                        5 => 'USER_COMMENT_FEED', 
                        6 => 'USER_LIKE_COMMENT',
                        7 => 'FROM_APP',
                        8 => 'NEW_FEEDBACK',
                        9 => 'TAGFRIEND_POSTFEED',
                        10 => 'TAGFRIEND_COMMENT',
                        11 => 'EVENT_NOTIF',
                        12 => 'GROUP_ADD_MEMBER_NOTIF',
    );

    static function getConfig($id)
    {
        $class = new ReflectionClass('SGN_NotificationConfig');
        $notificationTypes = $class->getStaticProperties();
        return $notificationTypes[self::$MAP_ID[$id]];
    }
}